Fix a few things related mostly to linking, which were giving problems in Mac OSX.
merged
mentioned in issue #4 (closed)