When http://d.puremagic.com/issues/show_bug.cgi?id=1663 was fixed, pragma(lib, ...) was forbidden as a statement. That should be in the spec.
Welcome to Bugzilla. The way to link to other issues is to write simply bug 1663 or issue 1663 Looks better, and Bugzilla puts in a title attribute and formatting to show the status.
Pragma's are allowed as statements in both D1 and D2, and they are in the spec.