Fixed various build automake issues.