python: Fix compiler warnings when building python3 bindings