Make thread support depend on whether 'forks' is available