Small changes for easier static linking

Experienced some minor issues while trying to link statically against the library. Those two patches should ease static linking.