Add insert_elem/3 and delete_elem/2 functions

For Erlang versions prior to R16B, emulate corresponding BIFs