Fixes for Mac tests

By @hpinkos and I for #1048.

These pass on my Mac/NVIDIA and Windows/AMD.