fixes for v8 and lua (with help of gcc)