Older bash versions in `sh -c` mode don't parse `export FOO=42` constructs, they bail out with a "FOO is not an identifier" error message. This was fixed somewhere between bash 4.1.0 and 4.1.5 but let's support the older versions anyway.