fix amr build