Fix mac library loading