The proper solution is to move the relevant code to the Blender namespace. It should look ugly until then because it is.