(Re)implement defaults({ replace: ...}) support, fixes #11, thanks @ngryman