Fix QDataStream protocol version to Qt_4_7
Add hack to fix typedef problems

Qt5 moc replaces qint32 with int