Fixed linker error on Mac OS X when compiling with Qt 5

Based on Qt Creator commit a4e593c910cca.