Accessing to option 'optimize-autoloder' inside 'post-autoload-dump' script event

Fixes #3313