Add build rules for 3rdparty libs
Add build hacks for mavericks