Switch Slave Select pin with Ethernet shield

That's so because the IDE is restructuring your sketch before sending the generated source file to the compiler. It works if you use it in another tab (a separate source file, these are sent to the compiler as-is).