Cross-platform modifications

 * As discussed in issue #1
 * This version has been tested and works on:
   - Debian 6.0 (Squeeze)
   - OSX 10.6.8 (Snow Leopard)
   - CentOS 6.3