Don't crash when running benchmark on OS X.

Change-Id: I839b8ec72d14f663893067867567cb5ee4ab06e3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Restore compilation of qtmail example.

Change-Id: Id59253e1d121ab0dfcdb59f7018b897f6c1df086
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>