Clean-up guards for platform dependent code.
For C++, use extern "C".
Change unix-specific code:

 * Use fork(2) and waitpid(2) instead of system(3).
 * Improve error handling.
Update README.