doc: try to fix API doc generation for readthedocs

Might make this more sophisticated in the future if we need to start
generating more pre-docbuild files.