Fix defines of env patch to work