build shared library before nosetests

fix tests failure on builbot