Bake Ambient Occlusion in Unity at Runtime

Is it possible to bake (to export, save as tga/png/etc) ambient occlusion texture for a procedurally generated mesh - at runtime? The bake would be called when the user selects to export the texture map of the procedurally-modified geometry at runtime.

If you're willing to write your own lightmapper sure, but you won't be able to use beast at runtime, it's only included with the editor