use more generic approach to change erlang flags