Fixed build on Linux(Ubuntu).

Contributed by @shahid-pk.

Closes pull request #360.