Use autotools for cross platform friendliness

Hi!

This pull request is continued from this [pull request](https://github.com/jtoy/cld/pull/6).

Previously I tried to keep the changes minimal but I later realized that it wasn't sufficient to truly satisfy cross compatibility issues.

This second attempt is admittedly much bigger due to leveraging libtool (e.g. the auxiliary files) but in return, this project is now cross platform friendly.