That just means you have to do a little more work.
1. Become root.
2. Fork until the process table is full.
3. Kill all other processes. After each kill, fork until the process table is again full.
4. When all processes other than the init process are yours, you can do the stat and unlink without worrying about race conditions since there is no one else to have a race with. (Assuming the file you want to stat and unlink isn't some file that your init process is interested in, and assuming it isn't on a network drive).
The side effects of this are annoying to deal with though and are probably worse than whatever problems an unhandled race condition would cause.
Another approach would be to create a new user, chown the directory containing the file to that user, become that user, chmod the directory to 0300, kill any process that has that file open, do your stat and unlink, chown and chmod the directory back to what they were, and delete the earlier created user.