Fix for Clang
Fix GMP serialization

Also fix same issue in PDO.