Use new-style buffer interface on Py3