gtpython: use c_bool return type

This fixes an issue with clang-compiled libraries where the
return value of a C bool function would not be 0 or 1 if
interpreted as int.
add check for Python version