only calculate coverage when possible

Travis-ci only makes secure environment variables available when
merging from a branch.  This change allows the test coverage to
continue to be calculated, even when merging from a fork.