Set link flags conditionally

Add OS X frameworks needed for correct linking.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>