Derivative expansion of the renormalization group in O(N) scalar field theory