How do I apply Ambient Occlusion in Forward Rendering to the ambient term only?

I want to integrate Ambient Occlusion into my rendering which is a forward renderer.
How do I apply Ambient Occlusion to the ambient term only and thus not as a "post process" over the entire image (i.e. frambuffercolor * ambient occlusion)?