Worked around some compiler errors with GCC 4.4 and 4.5.