Added a precprocessor conditional so the gold hack only applies to debug builds.