Use different ld flags for mac

I had troubles installing the Java bindings for OpenCV on my OS X 10.7, and this fixed it right up for me. Turns out ld takes different flags in OS X and Unix.

At least one other person had the same problem (I'm the answerer who said they would submit a pull request!): 
http://stackoverflow.com/questions/15752619/building-opencv-with-java-support-on-mac-os-x-64-bit/15779218