valgrind: more fixes for mavericks

This commit consists of two minor tweaks:

- Use the patch from Valgrind Bug Tracker, not the modified nonsense
  on gist.
- With Clang 3.4 and later (unrecognized option '-mno-dynamic-no-pic'
  has become a fatal error, which was simply a warning before).