Quantum effects of the atom-cavity interaction on four-wave mixing