Fix the output type of `staticlib`

The file-naming bits weren't handling the staticlib case