The effective potential in three-dimensional O(N) models