Adds modified makefile for creating as library on OSX and Linux