Run dsymutil less on OSX

Instead of running dsymutil for all builds, this changes it to only run the program for debug builds.

Closes #3495