Forward compatibility with automake 1.14

This update makes sure that the build still works with automake prior to
1.12 and at the same time does not give any warnings or errors with
automake 1.14
Add .dirstamp to gitignore

Seems like the subdir-objects automake option is generating .dirstamp
files which should be ignored by git.
Add forgoten source to the dist target
Merge pull request #550 from jin-eld/automake-portability

Forward compatibility with automake 1.14