Here is a demo that shows it can be done, http://duopixel.com/stack/test.html, check in webkit and Firefox.
Explanation: the only way to mask an image in Firefox is through svg masks:
https://developer.mozilla.org/En/Applying_SVG_effects_to_HTML_content,
It can be done more elegantly (with an svg from an external source) but this makes it easier to understand.
The actual code is pretty simple, just...
mask: url(#id);
Or if you want to reference an external source:
mask: url(test.html#id);
Also, the code is on my server because you must serve the html as xhtml, otherwise Firefox ignores the mask. This can be done through .htaccess like this:
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0
RewriteCond %{REQUEST_URI} \.html$
RewriteCond %{THE_REQUEST} HTTP/1\.1
RewriteRule .* - [T=application/xhtml+xml]
jsfiddle is not serving xhtml/application