Crude extends losses, US oil trades below $40