allow for optional static compilation by overriding BUILD_SHARED_LIBS to OFF