Phase-controlled optical Faraday rotation in a closed-loop atomic system