Duplicate texture stealing code from mac for unix.
Merge pull request #20 from jdm/unix

Duplicate texture stealing code from mac for unix.