fixed bug with newer qt versions and boost libraries

Without these if statements the code won't compile with actual boost libraries