fixed implementation of maximum commit age in api/getwork