Fix the new compatibility issue in #5407

I had fixed an encoding error in pull request #5407. But it has brought a new compatibility issue. The open BIF in python 2 won't accept the `encoding` parameter and it will occur a `TypeError`. So I create a function to encapsulate the incompatibility.
Update build.py
Update build.py
Revert "Fix the new compatibility issue in #5407"

This reverts commit 07b6ae76ba5506a2a19d88f247c6903294c0b571.
Merge remote-tracking branch 'origin/dev' into dev

Conflicts:
	utils/build/build.py
Merge branch 'dev' of https://github.com/jarvisniu/three.js into dev