Added OS X library target and tests.