Support optionalDependencies

Closes #3