Fix compile method declaration compatibility