Hey Jun,
The reader on the REPL is running in Chez Scheme mode, which is more permissive for the syntax of identifiers, while the an R6RS library is processed in r6rs reader mode, which is more restrictive (as you've noticed). It is worth noting that the REPL uses a different mode, because the R6RS does not define a REPL or how it should operate.
You can change the operation of the reader by using the #!r6rs and #!chezscheme reader modifiers. So, at the top of you library file you can add #!chezscheme on it's own line to indicate that the reader should shift to chezscheme mode:
#!chezscheme
(library (foo bar)
---)
You need this to be an expression all by itself so that it will be evaluated before the reader begins working on the next expression in the file.
You can also change the handling of case by using #!fold-case to indicate the language should be case-insensitive (as Scheme was prior to R6RS) or #!no-fold-case (the default) for turn it off.
As far as the need to export an auxiliary keyword to use it from the REPL, this is again an R6RS-ism, which requires these identifiers are free-identifier=?, because identifiers are handled slightly differently in the REPL and the library they do not compare to be the same (effectively, they are not both unbound in the syntactic environment). This is why if you want the macro to work the same on the REPL, you need to define an export the identifier. I usually do something like:
(define-syntax lst (lambda (x) (syntax-violation x "misplaced aux keyword")))
-andy:)