Added pre-processor directives for Qt<5.0.0