Court rules in favor of NYPD in Muslim surveillance case