build shared library before nosetests

fix tests failure on buildbot