Fix building with Qt5 on MSVC by undefining min/max macros