Minimal changes to get it to compile with SD library