compile_val up to extend global case
fix bug in compilation of extend global

forgot to push the unit afterwards
another bug - forgot to do pushret

because extend global might happen in tail position
finish proof of compile_val