Use @rpath, removed useless casts