Use Python 2.5/2.6 compatible syntax with bz2.BZ2File (#10403)