Make Pew work on Linux (updated)

Here is the updated Pull Request that makes Pew work on Linux.