Digital compensation of RF nonlinearities in software-defined radios