Use compile_to_bytecode utility function.