Removed unneeded casts

The parameters already match the function declaration; no need to cast.
Use @rpath in Xcode project

In the Xcode project, set:

LD_DYLIB_INSTALL_NAME = @rpath

Such that the built dylib's install name uses rpath, which is
generally what one wants.