Linking to a shared library

I'm trying to get Valgrind to work with an openmpi application in OS X. However I want to hardcode the path to a shared library called libmpiwrap-amd64-darwin.so into my application so that it is available at runtime. In Linux this is relatively simple, I would just add the option -Wl,"-rpath=/PATH_TO_LIB_FILE" to my compiler (mpicc). This doesn't work in OS X however. How can I hardcode the path into my executable?