Ignore leading spaces in REPL

Fix #1732.
Merge pull request #1734 from soimort/fix-repl

Ignore leading spaces in REPL