Python3 compatibility in test program compilation

Similar fix to #1660.

Without this fix, a `'str' does not support the buffer interface` error is raised in Python 3.3 on Mac OSX 10.9. One place it occurs is during testing for the Mac OS sdot bug (line 73, blas_headers.py)
Merge pull request #1721 from jlowin/patch-1

Python3 compatibility in test program compilation