Derivative expansion and soliton masses