Made collections_compat valid in Python 2 and 3.

The coverage command needs to be able to parse this file when collecting
data.  This was never an issue before because it's never used with
Python 3.