ENH: updated build script to work with python >= 2.6