Fix some CMake errors concerning Python 2.7 on Python3-enabled operating systems.