Wilson-Polchinski exact renormalization group equation for O(N) systems: Leading and next-to-leading orders in the derivative expansion