Changes curl rewrite replacements to function calls instead on just names.

Fixes bug when only checking if a curl-method exists.