Add 'g' flag so that regex works on multiple shim init functions.