Link to libraries on mac os x and also make it easier to maintain versions

The others should also be changed to 5.1 instead of 5.0.10 but I'm not doing that since I cannot test it