Few compilation fixes for Qt > 5 and windows