Merge pull request #1 from joshcartwright/master

Build system cleanup
Changed to GPL v2
use strdup() instead of malloc()/memcpy()