BaseTools/BinToPcd: Fix Python 2.7.x compatibility issue